home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 5
/
Gold Medal Software - Volume 5 (Gold Medal) (1995).iso
/
games
/
egavga
/
life106.arj
/
LIFE106.DOC
< prev
next >
Wrap
Text File
|
1994-06-03
|
27KB
|
637 lines
LIFE 1.06 by Al Hensel
What is the meaning of LIFE?
----------------------------
LIFE is a classic computer game. It was invented by John H. Conway
in 1970, and has entertained many hackers and wasted many years of
computer time ever since. If you're smart and creative, it can be
very intellectually stimulating. It's a simulation game which can
generate strange and beautiful patterns, sometimes in complex and
interesting ways. Yet the rules of Life are delightfully simple:
- The game is played on a 2-dimensional grid. Each square, or
"cell", can be either "on" or "off".
- If a cell is off and has 3 neighbors (out of 8), it will become
alive in the next clock tick.
- If a cell is on and has 2 or 3 neighbors, it survives; otherwise,
it dies on the next clock tick.
For example, consider the following pattern, where '.' represents an
'off' cell and '*' represents an 'on' cell:
. * .
. * .
. * .
Notice that the cells in the middle on either side are off and have
3 neighbors: they will come alive. But the two '*' cells on the
ends each have just 1 neighbor; they will die of loneliness.
So the next generation is:
. . .
* * *
. . .
It's a Wonderful LIFE
---------------------
This version of Life is based on a 2 additional principles:
- The universe should be as large as possible (in fact, it's 524288
x 524288 !!). Most Lifes have small, array-based universes.
Things fall off the edge too easily. But this one even features
the Columbus Effect. Well, technically, the Life universe isn't
round, it is "toroidal". But it's so big, who cares?
- It should be as FAST as possible (check it out! Zoo o o o m!)
\ / Be sure to also check out LIFEP.ZIP, the new, improved, \ /
/ \ fun-filled collection of more than 100 Life pattern Hits! / \
Life is shareware -- copy it as you please; in fact, PLEASE copy it,
and:
- Register and get update notices and user support ("Life
insurance"?) for only $10!! This would also encourage me to
make it even better, and besides, it's nice to send a
contribution for a shareware program that you like. It makes
you feel all warm and happy inside.
- All you hackers: I'll send you the source code for just $10 more.
Imagine, years of thought into a brilliant life algorithm, for
only $20! What a steal. It is written in Borland C++ 3.1 and
8086 Assembly.
My address is:
Al Hensel
34 Halsey Reed Rd.
Cranbury, NJ 08512
You can also make me happy by sending me e-mail at 71162,1500 on
CompuServe (Internet address 71162.1500@compuserve.com).
Send me your ideas, questions, complaints, bugs, new life patterns,
fan mail...
You can even register the program via CompuServe. GO SWREG and use
registration number 279.
Now, almost everyone so far has suggested that the game be in color.
If you change the screen colors in DOS, Life will adopt them. As
for changing color according to the age of a cell, well, I don't
like it; I really don't think it's worth the trouble. If you want
colors tied into the rules of the game -- that is, more than 2 cell
states -- you can satisfy your curiosity with the commercial package
"Chaos: The Software" by Autodesk, Inc.
Life will also try to adopt your current video mode. If you have
VGA and put the screen in 50-line mode, Life's text mode will be 50
lines. I have tried to support as many modes as I can. My monitor
has a 132x44 mode that I like.
LIFE and how to live it
-----------------------
I hope I have made Life as easy as possible. There are even
pull-down menus -- just hit the ESC key and use the arrow keys. But
for all of you out there who read the manual (both of you), here ya
go:
Run Life by typing at the DOS prompt:
life
You can also specify a pattern on the command line, like so:
life spark2pi
(I like spark2pi; it's one of my own.)
Note: IF YOU HAVE VGA MONO, you might want the background color to
be black instead of blue. To do this, use the -m switch, e.g:
life -m spark2pi
Vital Functions:
- Use the arrow keys to move the cursor.
- To add or delete a cell, hit the spacebar.
- RETURN makes it go; once it's running, any key makes it stop.
- 'q' commits suicide.
Other Functions:
- 'o' does just One step. Because sometimes Life goes by too fast.
- 'g' prompts you for how many steps you want to do, then does them.
- 'b' puts on the Brakes. This Life program is a 10-speed. Speeds
1 thru 9 are 18, 9, 6, 4.5, 3, 2, 1.5, 1, and .5 gens/second,
respectively; 0 is full speed ahead (same as 'v' below.)
- 'v' sets you back to Speed 0 again (Vrrrroom!)
- 'c' Clears the universe.
- 'd' pops up a description of the current pattern, if it has one.
As of yet, since I've been too lazy to write a little text editor
for the Life program, you must use a separate text editor on the
life files to edit the descriptions. Life can only view them.
- NumLock -- when NumLock is on, the number keys move your view of
the universe. You can follow gliders and watch what's happening
off the normal edge of the screen. Watch out -- try not to mix
it up with normal cursor movement if you use the arrow keys on
the numeric keypad.
- '5' centers the universe. (This goes along with the above.) So if
you've wandered far away, it's easy to get back.
- Insert: when insert is on, you can draw a solid line without
hitting the spacebar. It is as if you are hitting the spacebar
on every cell.
- Del: takes you out of Insert mode, of course.
- '+', '-' changes cell size. Hi-res only works with Hercules Mono,
CGA, EGA, and VGA. VGA also has a medium resolution. Lo-res
mode should work with any monitor, since it is text-based.
- 's' lets you Save a pattern. The position of the cursor is used
as the pattern's origin (that is, the (0,0) point).
- 'l' lets you Load a pattern. The pattern's origin is put at the
cursor. Hit the spacebar for filename completion - this makes
it easier to browse through the collection.
- 'f' flips the pattern vertically (turns it upside-down). The
cursor position is used as the axis of the flip.
- 'm' mirrors the pattern (reverses right/left). Again, the cursor
position is used as the axis.
- '>' rotates the pattern 90 degrees clockwise around the cursor.
- '<' rotates the pattern 90 degrees counterclockwise around the
cursor. Note that the fastest way to do a 180-degree rotate is
Mirror, Flip.
- '!' draws a few hundred random pixels in a 80x48 box wherever
you're at.
- '#' lets you change the random pixel settings.
- 'k' tells you how many living cells are in the current universe.
- 'p' tells you your cursor's x,y position.
- 'r' lets you change the Rules. I put it in a format of 23/3,
where the numbers before the slash are how many neighbors a
living cell needs in order to survive, and the numbers after the
slash are how many neighbors a dead cell needs in order to come
alive. For obvious reasons, you can't use '0' for the latter --
the whole universe would light up! And, for not-so-obvious
algorithmic reasons, you can't use '1' either.
This rule format follows the classic Unix workstation
implementation for life called Xlife. Some have found it
confusing, however, so I have provided the ability to tag an "s"
onto the survival list, and a "b" onto the birth list. Thus the
following are equivalent: 23/3, s23/3, b3/23, 3/s23, B3/S23,
23/3b, 3/23s, 3b/s23, 2s3/3, and so on.
- 'n' returns you to Normal rules (23/3).
- 'Alt-B' puts you in Box mode, which is like cut & paste. You draw
a box around the pattern you want to move (using the mouse is
most convenient here), then hit the spacebar. The pattern will
get sucked into the box. Now you're in Paste mode, and you can
move the box anywhere, and hit the spacebar again to put the
pattern down. Notice that hitting the spacebar once is like
"cut", twice is like "copy". To get out of "paste" mode, hit
'Alt-D' for "Draw" mode.
When you hit 'Alt-B' again, you'll go directly back into Paste
mode, because the snipped pattern has not been discarded. You
can discard it and go back to Box mode by hitting Alt-B again.
You might get in the habit of hitting Alt-B twice in order to go
straight to Box mode.
Load to Box: If you are in Box mode when you load a pattern, the
pattern will be loaded into the box. This is useful anytime you
want to merge two patterns.
LIFE in the Fast Lane
---------------------
Since Life is a solitaire game, there is no end to the possible ways
to be creative with it. Variety is the spice of Life! No-one can
tell you the right way to play; in fact, why don't you send me a
note and tell me your own unique ways?
It's common to start out by drawing random junk and seeing what it
turns into. The '!' key is specially designed for that, but you can
also draw lines, boxes, your name, etc. Or, you can play with some
of the patterns from LIFEP.ZIP. Some of them are like puzzles to
figure out: How do they work? And how would anyone come up with
such things? For example, randgun, p94s, breeder? What happens
when you change just one little cell...? OK, that's fun for a
while. You get familiar with the common stuff -- the stable
patterns, the blinkers, the movers, and the shakers.
Then there's the engineering approach: try to invent a pattern that
does something interesting. This is a challenge -- the Game of Life
is certainly not horseshoes or hand grenades! Ever hear of the
Butterfly Effect?
For example, try to create one long, snaking line that remains
perfectly stable. Along the way, you will discover rules, like the
offset-by-2 rule... You'll know what that is when you find it.
Or you can try to create "billiard table configurations". These are
mostly stable, with just a few cells blinking or bouncing around
inside. Here's the smallest possible billiard pattern:
* * . .
* * . .
. . * *
. . * *
Other patterns involve gliders -- how to generate them, bounce them
around, absorb them, and generally use them for your general
amusement. Gliders look like this:
* * .
* . *
* . .
There are other moving objects, though, like the so-called fish,
whales, and spiders, which all go under the general name of
"spaceships". In Pattern Collection #2, I put them all in
"aquariums", called "AQUAxx", where xx is their speed. They are so
hard to create that nearly every one of them had to be found by
computer search programs. No human could possibly find a unique new
spaceship (try it!)... Although, sometimes parts can be recognized
and mixed and matched with other parts, to make hybrid ships and
other new stuff (mostly found in Collection #2).
If enough spaceship pieces can be correlated, you can form what is
called a "grammar": the pieces are like words in a sentence, which
can only go in a certain sequence according to syntactic rules, and
can form spaceships of any length. In Pattern Collection #2, most
of this redundancy has been omitted and left for you to discover,
because otherwise there would be an infinite number of patterns.
Not good for hard disk space.
It's easy, though, to play with fuses. Fuses are long stable
repetitive patterns that "burn" at one end. You can use Box mode to
build long fuses, then light one end with the Random Pix feature,
and see how the fuse burns. You can try to go make them go around
corners, branch out, explode a bomb...
And once you've tried all that, you can go back to the patterns that
are in LIFEP.ZIP and gape in amazement!
In Pattern Collection #2, "TIRETRAX" and "STRETCH" make nice fuses.
You can also set up betting games. For example, pick a gun, then
put something in its line of fire.... One of 3 things must happen:
- The gun blasts thru the pattern -- but sometimes only after a long
struggle. The debris sizzles out and the gun is victorious.
- The gun is lapped up by the flames.
- An "eater" pattern appears, swallowing bullets forever.
Place your bets!
If you have Pattern Collection #2, I think the above is most fun
with SAWTOOT4. Another good betting game is to put a herd of whales
(AQUA25B is best for this, in my opinion) in the path of some
debris, and bet how many of them will survive. (Save the Whales!)
With the Rule Change option ('r'), you can explore other universes.
You'll find a lot of deadbeat universes at first, so let me point
you to a few good ones, most of which are represented in the Weird
Pattern Collection (LIFEPW.ZIP):
/2 - everything dies every generation... yet you can hardly contain
the explosion! Try this simple pattern:
* *
* *
(That's right, just a little 2x2 square.)
Hey wait, is this art? I thought it was math. Hmm...
If you want to circumnavigate the universe with a glider, this
is the universe to do it in: Its gliders go at the "speed of
light":
. * * .
* . . *
/234 - produces very beautiful fabric-like patterns. Try the above
square.
01245678/34 is an even better "artist". Though some starting
patterns leave the canvas blank, many others are very artsy.
12345/3 - aMAZing -- another exploding universe, but look how it
crystallizes... Also, try 1234 for the first half. And try
/37 for the last half: Rats! If you don't like the explosion,
try /45 for the last half.
245/368 - Things die out quickly, but there are a few neat things:
* . .
* * . * . . . . *
* * * . * * * * .
1358/357 - An attempt at the most stable "amoeba" universe. Best
viewed in Hi-Res mode, starting with a large pattern. Does it
die out, or go on forever?
125/36 - This one goes pretty well, neither dying quickly nor always
expanding, and there are about a dozen weird naturally
occurring repeaters. Also, try 2-by-n boxes (thick lines),
where n is an integer not of the form 4k-1, 2^k-2, or 2^k-3.
Try also the slight modification 1258/36. Suddenly change the
rules to 4567/345. Watch how it rots if you break the 2x2
block symmetry. This kind of symmetry occurs in only 32 ways.
They are the 2^5 combinations of 3/12, 4/4, 5/3, 67/5, and 8/.
You can also add 0, 1, or 2 to the Survival list and 6, 7, or
8 to Birth list, with no consequence to its 2x2 block
properties. (Note: 3/12 can't be done with this program due
to the /1 in the Birth list).
238/357 - Similar to the normal game, but it's still not clear
whether there are any ever-expanding patterns, like a glider
gun or a puffer train. I know of only one spaceship in this
universe, and I haven't been able to make anything out of it.
23/36 - Even more similar to the normal game, but there are a few
interesting things about this one. First of all, one would
expect, in general, that adding digits to either side of the
rules would make the universe more excitable. But this
universe actually dies out quicker than regular life. There
is one good exception:
* * * .
. . . *
. . . *
. . . *
This rule has actually generated enough interest to have a
nickname. It is called "HighLife".
235678/3678 - Ice crystals. Close variations of these rules almost
always expand forever, but this one curiously does not.
235678/378 - Close variation of the above, which forms really neat
white coagulations as it expands forever. Definitely view in
Hi-Res mode.
Interestingly, the above 2 universes support the regular life
glider.
125678/367 - White coagulations that catch up with the border and
stops it in many places. But it does generally grow forever.
The above universe supports the 125/36 glider.
45678/3 - Slowly expands forever with little tentacles.
5678/35678 - Sent by Dean Hickerson, author of PUSHER, P94S, and
other great patterns. You need to start it with a rather
large white blob, larger than the default random-cells
function can provide. It forms rectangles that look pretty
stable for a while, then, suddenly... Note: This is another
2x2 block universe.
You can also try slight modifications of the normal rules, like
237/3 and 023/3... 2378/38, for example, looks pretty normal at
first... Or, you can use an expanding universe to "grow" a pattern,
then watch how it decays under normal (or other) rules. This
produces some pretty kaleidoscopic effects. And some patterns can
probably even be used as Rorschach tests.
Or, if you're really smart and have some time on your hands, you can
ponder the more intellectual questions, like: Can a pattern in the
Life universe be built that reproduces as though it were really
alive? (Exactly what kind of patterns can be built, anyway? For
example, can they be Turing-complete? The answer to this last one
is "yes". Now find the proof. Better yet, write a C compiler whose
target language is Life instead of Assembly!) And how is entropy in
the Life universe related to entropy in our own universe? Can any
of the laws of thermodynamics apply to a universe that does not
observe conservation of mass and energy?
In the Life universe, is there an irresistable force? The answer is
"no", because otherwise you could oppose two of them. Alright, but
is there an immovable object? That is, can you surround a cell with
some kind of "wall" such that no matter what you put outside the
wall, the state of that cell can never change? That question
remains unanswered.
A pattern that has no predecessor ("father") is called a Garden of
Eden pattern. What is the smallest one? A satisfactory one is in
the collection (EDEN.LIF). Another question: Is there a pattern
with a parent but no grandparent? (This question is trickier than
it sounds at first.) In general, is there a pattern with an
immediate predecessor but without an infinite sequence of ancestors?
Is there a stable pattern that is its only predecessor?
What is the smallest object (measured by number of initial "on"
cells) whose population grows unboundedly? The current record is
the switch engine (SWITCHEN.LIF) which starts with only 11 cells.
What is the smallest object that grows quadratically? The current
record is the spacefiller (MAX.LIF) with 206 cells.
What is the highest possible average density of a periodic field?
It is conjectured to be 1/2, and proven to be between 1/2 and 8/13,
inclusive. VENETIAN.LIF is just such a high-density oscillator. If
the maximum is really more than 1/2, then the growth rate of MAX.LIF
may not really be the max!
How many distinct 3-glider collisions are there? 4-glider? 5?
For each positive integer T, what's the largest possible quotient of
the population in gen T divided by the population in gen 0? (For
T=1, we can get arbitrarily close to 3, but can't reach it. For
T=2, the upper bound again seems to be 3, but is unproven.)
Some yet-unfound but looked-for objects: A c/5 orthogonal spaceship,
a c/6 diagonal spaceship, a c/3 puffer. A p17 oscillator. A way to
grow an infinite spiral-shaped object. A stable pattern that
reflects gliders. Reflectors for larger spaceships, and fuses such
as ZIPS.LIF. A lot can be learned from glider collisions, although
it is tedious to do by hand. But programs can be written to search
for various kinds of collisions, and, for example, find that the
collision of a glider with a certain stable pattern leaves that
pattern displaced in a certain direction and emits a glider back.
If that were found, then two or more of them might be put together
to create a brand new kind of spaceship.
That's the end of my suggestions, but by no means the end of the
possible ways to play the game. Discover your very own "way of
Life".
- - -
More enlightenment:
-------------------
- Berlekamp, Conway, and Guy: Winning Ways (for your Mathematical
Plays), Volume 2, (c)1982. ISBN 0-12-091152-3.
- Dewdney, A.K.: The Armchair Universe, (c)1988.
ISBN 0-7167-1939-8 pbk.
- Gardner, Martin: Wheels, Life, and Other Mathematical Amusements,
(c)1983. ISBN 0-7167-1589-9.
- Gutowitz, Howard: Cellular Automata: Theory and Experiment,
(c)1991. ISBN 0-262-57086-6.
- Poundstone, William: The Recursive Universe, (c)1985.
ISBN 0-688-03975-8.
- Preston, Duff: Modern Cellular Automata
- Sigmund, Karl: Games of Life
- Wolfram, Stephen: Theory and applications of cellular automata,
(c)1986. ISBN 9971-50-124-4 pbk.
- BYTE magazine: Sep 75, Oct 75, Dec 75, Jan 76, Dec 78, Jan 79,
Apr 79, Oct 80, Jul 81.
- Complex Systems: Bays, Carter: (various articles on 3-D life)
Apr 87, Dec 87, Dec 90, Feb 91, Oct 92.
- Recreational Computing: May/Jun 79.
- Reviews of Modern Physics, Vol. 55: Stephen Wolfram: "Statistical
Mechanics of Cellular Automata."
- Scientific American: Oct 70, Nov 70, Jan 71, Feb 71, Mar 71,
Apr 71, Nov 71, Jan 72, Dec 75, Mar 84, May 85, Feb 87, Aug 88,
Aug 89, Sep 89, Jan 90.
- "LifeLine: A Quarterly Newsletter for Enthusiasts of John Conway's
Game of Life", nos. 1-11, 1971-1973.
These issues are probably still available. Write to:
Robert Wainwright (ed)
LifeLine
12 Longvue Ave.
New Rochelle, NY, 10804
- On the Internet, there is a newsgroup called
comp.theory.cell-automata. Also, check out the ftp site
life.anu.edu.au, directory /pub/complex_systems.
Biography:
----------
1.00 - hardly worked.
1.01 - went to a friend.
1.02 - First shareware version.
1.03 - Added Random Pix.
Added "#Life 1.03" to .lif files for future compatibility
checks.
Made executable as small as possible.
Added dynamic memory allocation (patterns can get REAL BIG!)
This version had bugs, but it got sent to a friend anyway.
1.04 - Fixed 4 nasty bugs.
When patterns get too big, say "Out of Memory" instead of
hanging the computer.
Added "Are you sure?" for Clear and Quit.
Added weird messages at top of screen.
Load and save relative to the cursor.
Different versions of Life 1.04 may be floating around.
1.05 - Renamed, revised a few patterns.
Added Mirror and Flip.
Made Hi-Res work with VGA monitors.
Released as shareware.
1.05a- went to a friend.
1.05b- More slight changes; released as shareware again.
1.05c- More slight changes; added 'k' key; uploaded to CompuServe.
1.05d- Added 'p' key.
Made Hi-Res work with EGA monitors.
Fixed one nasty bug.
Included in book "FractalVision" by Dick Oliver, SAMS
Publishing; about 15000 copies sold.
1.05e- Added 'g' key.
Added 'b', 'v' speed adjustments.
1.05f- Toyed with a few ideas.
1.05g- Added Cut & Paste.
1.05h- First beta before 1.06
1.05i- Whole new library of patterns became available.
Fixed generation count resetting.
Mouse support.
Medium-resolution for VGA.
Alternative text modes for VGA (50 line mode, etc.)
Screen color setting was spruced up.
1.06- Beta-released for a month on the Internet. So some of the
intermediate versions may be floating around.
Minor fixes, and polished up the pattern collection.
Released in May 1994; uploaded to CompuServe, the ftp site
life.anu.edu.au, and other fertile breeding grounds.
Once again:
-----------
The $10 registration fee, in US or Canadian dollars, entitles you to
free support and release notices. Technically, the LIFE.EXE
extracted from LIFE16.ZIP is Shareware, which is what your
registration pays for, but all the .LIF files are Public Domain and
are included for free.
If you have CompuServe, there is a quick & easy way to register: GO
SWREG, and use shareware registration number 279. The greatest
advantage of this method is that foreign registrants without easy
access to US dollars can register easily. However, this method pays
a 15% fee to CompuServe, leaving me with $8.50, even though you paid
the full registration... (Of course, you'll still receive the same
registration benefits.)
------------------------- DISCLAIMER -----------------------------
THE AUTHOR CLAIMS NO RESPONSIBILITY FOR ANY DAMAGES CAUSED BY THIS
PROGRAM, INCLUDING CANCER ON THE FACE IN THE SHAPE OF "THE BREEDER",
SORE FINGERS, ANY FORM OF PSYCHOSIS SUCH AS DRIVING TOO SLOW IN THE
FAST LANE, AND/OR OVERSTIMULATION, WHETHER IT BE MENTAL, SEXUAL, OR
RELATED TO THE ELECTRIC BILL. USE ONLY AS DIRECTED.
CONWAY'S GAME OF LIFE DOES NOT DISCRIMINATE ON THE BASIS OF GENDER,
RACE, CREED, NATIONALITY, OR BELLY-BUTTON TYPE. THE GAME OF LIFE IS
ENVIRONMENTALLY SAFE. LIFE PATTERNS ARE 100% RECYCLABLE. PACKAGING
MATERIALS ARE MINIMAL DUE TO THE NATURE OF SHAREWARE.
DO NOT BE INTIMIDATED BY THE PATTERN COLLECTION! THESE ARE THE BEST
OF THE BEST, AND YOU CAN FIND HAPPINESS IN LIFE WITHOUT MATCHING
THEIR QUALITY. IF, HOWEVER, YOU ARE SO INCLINED, HAVE FUN, BUT BE
FOREWARNED THAT IT MAY TAKE MANY HOURS AND SOME KIND OF GENIUS/NUT.
----------------------------- EOD --------------------------------
Send any ideas, questions, complaints, bugs, new life patterns, fan
mail, or anything really interesting or useful (a registration,
maybe?), to:
Al Hensel
34 Halsey Reed Rd.
Cranbury, NJ 08512
Thanx go out to:
----------------
John Conway, the British mathematician who invented the game;
Dean Hickerson, who not only helped me build Pattern Collection #2,
but also created many of the patterns;
Jon C.R. Bennett and his henchmen at Carnegie-Mellon University;
Other pattern authors (certified geniuses/nuts): Bill Gosper, Dave
Buckingham, Hartmut Holzwart, David Bell, Rich Schroeppel, et al.;
And thanks also to anyone else who has contributed along the way.
- - -
Well, enjoy!
In fact, have the time of your Life!
Merrily, merrily,
Merrily, merrily,...